package cn.rkylin.oms.warehouseDocking.service;

import cn.rkylin.oms.warehouseDocking.dao.IStockinDAO;
import cn.rkylin.oms.warehouseDocking.domain.Stockin;
import cn.rkylin.oms.warehouseDocking.domain.StockinSku;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * stockin服务层
 *
 * @author fengwang
 * @created 2017年11月7日
 */
@Service("stockinService")
public class StockinService {

    @Autowired
    IStockinDAO iStockinDAO;

    public int updateByPrimaryKeySelectiveStockin(Stockin stockin) throws Exception {
        int iRtn = iStockinDAO.updateByPrimaryKeySelectiveStockin(stockin);
        return iRtn;
    }

    /**
     * 更新 退货入库单商品成本价
     *
     * @param stockinSku
     * @return
     * @throws Exception
     */
    public int updateStockinSkuById(StockinSku stockinSku) throws Exception {
        int iRtn = iStockinDAO.updateStockinSkuById(stockinSku);
        return iRtn;
    }
}
